<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <%-- 页头 --%>
    <title>订单管理 - ReadJava教程</title>
    <%@include file="../common/head.jsp" %>
</head>
<body>
<div class="wrapper">

    <%-- 导航 --%>
    <%@include file="manage-header.jsp" %>

    <%-- 侧边栏 --%>
    <%@include file="manage-sidebar.jsp" %>

    <div class="main-panel">
        <div class="content">
            <div class="container-fluid">
                <h4 class="page-title">订单管理</h4>
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header">
                                <button class="btn btn-xs btn-default"
                                        onclick="window.location.href='/manage/video/category/add'">
                                    新增视频
                                </button>
                                <button class="btn btn-xs btn-default"
                                        onclick="window.location.href='/manage/video/category/add'">
                                    新增视频分类
                                </button>
                            </div>
                            <div class="card-body">
                                <div class="table-responsive">
                                    <table class="table table-bordered table-hover">
                                        <thead>
                                        <tr>
                                            <th>视频编号</th>
                                            <th>视频标题</th>
                                            <th>视频价格</th>
                                            <th>视频图标</th>
                                            <th>视频目录</th>
                                            <th>视频状态</th>
                                            <th>操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <c:forEach items="${VCList}" var="vc">
                                            <tr>
                                                <th>${vc.vcId}</th>
                                                <td>${vc.vcTitle}</td>
                                                <td>
                                                    <span class="badge badge-warning">￥${vc.vcPrice}</span>
                                                </td>
                                                <td><i class="la ${vc.vcIcon}"></i></td>
                                                <td>更新时查看</td>
                                                <td>
                                                    <c:choose>
                                                        <c:when test="${vc.vcState == 0}"><span
                                                                class="badge badge-default">启用</span></c:when>
                                                        <c:when test="${vc.vcState == 1}"><span
                                                                class="badge badge-danger">禁用</span></c:when>
                                                    </c:choose>
                                                </td>
                                                <td>
                                                    <button class="btn btn-xs btn-success"
                                                            onclick="window.location.href='/manage/video/category/get/${vc.vcId}'">
                                                        更 新
                                                    </button>
                                                    <button class="btn btn-xs btn-info"
                                                            onclick="window.location.href='/manage/video/list/${vc.vcId}'">
                                                        分类视频
                                                    </button>
                                                    <button class="btn btn-xs btn-danger"
                                                            onclick="deleteVc(${vc.vcId})">
                                                        删 除
                                                    </button>
                                                </td>
                                            </tr>
                                        </c:forEach>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<%-- js --%>
<%@include file="../common/script.jsp" %>

</html>